<template>
  <div class="Swipe">
    <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
      <van-swipe-item v-for="(item) in swipeList" :key='item.id'>
        <img :src="item.img" alt="">
      </van-swipe-item>
     
    </van-swipe>
  </div>
</template>

<script>
import Vue from "vue";
import { Swipe, SwipeItem } from "vant";
Vue.use(Swipe);
Vue.use(SwipeItem);
export default {
    // 父传子 接受数据 props
    props:{
        swipeList:{
            type:Array,
        }
    }
};
</script>

<style scoped lang='scss'>
.Swipe {
  position: absolute;
  width: 95%;
  left: 40px;
}
//轮播图
.my-swipe .van-swipe-item {
  color: #fff;
  width: 350px;
  height: 550px;
  font-size: 20px;
  line-height: 150px;
  text-align: center;
  // background-color: #39a9ed;
  img{
    width: 100%;
    height: 100%;
  }
}
</style>